<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserLogin extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_login', function (Blueprint $table) {
            $table->increments('id');
            $table->string('ip')->comment('ip');
            $table->integer('userid')->default(0)->comment('用户id');
            $table->dateTime('logintime')->comment('登录时间');
            $table->string('type')->comment('类型:index/order/recharge');
            $table->string('user_agent')->default('')->comment('user-agent');
            $table->string('registerresource')->default('')->comment('注册来源');
            $table->string('deviceid')->default('')->comment('设备id号');
            $table->string('osversion')->default('')->comment('系统版本号');
            $table->string('phonetype')->default('')->comment('手机型号');
            $table->string('versioncode')->default('')->comment('版本号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
